﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace DingTalkAgent.Web.Controllers
{
    public class HhomeController : BaseController
    {
        // GET: Hhome
        public ActionResult Index()
        {
            return View();
        }

        public ActionResult list()
        {
            if (Request.IsAjaxRequest())
            {

                //获取查询条件
                int rows = Convert.ToInt32(Request["rows"].ToString());
                int page = Convert.ToInt32(Request["page"].ToString());
                var name = Request["name"].ToString();
                var password = Request["password"].ToString();


                var list = new List<mytestclass>();
                for (var i = 0; i < 30; i++)
                {
                    list.Add(new mytestclass()
                    {
                        id = i.ToString(),
                        invdate = "2007-10-04",
                        name = "test",
                        note = "node",
                        amount = "200.00",
                        tax = "10.00",
                        total = "210.00",
                    });
                }

                return Json(list);
            }
            return View();
        }

        public ActionResult add()
        {
            return View();
        }

        [ValidateInput(false)]
        public ActionResult editMode()
        {
            var a = Request;
            return View();
        }
    }
    public class mytestclass
    {
        public string id { get; set; }
        public string invdate { get; set; }
        public string name { get; set; }
        public string note { get; set; }
        public string amount { get; set; }
        public string tax { get; set; }
        public string total { get; set; }

    }
}